import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'  // 导入路由对象
import store from './store'

Vue.config.productionTip = false

console.log('Vue2 项目的 主入口文件 - main ')

// 1. 全局组件注册
import Nav from '@/components/Nav.vue'
Vue.component('Nav',Nav)

import MyInp from '@/components/MyInp.vue'
Vue.component('MyInp',MyInp)


// 2. 事件总线
const bus = new Vue()
Vue.prototype.$bus = bus; // this.$bus = bus;


new Vue({
  data: {

  },
  methods: {

  },
  watch: {

  },
  // bus,   // this.$bus = bus;
  router,  // this.$router 取值
  store,   // this.$store
  render: h => h(App) // render 渲染或者接手一个模板组件数据 App 根组件
}).$mount('#app')
